<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>JSP</title>
    <link rel="stylesheet" href="../../css/base.css" />
	<link rel="stylesheet" href="../../css/info-mgt.css" />
	<link rel="stylesheet" href="../../css/info-reg.css" />
	<link rel="stylesheet" href="../../css/WdatePicker.css" />
	<script type="text/javascript" src="../../js/jquery.js"></script>
	<script type="text/javascript" src="../../js/common.js"></script>
	<script type="text/javascript" src="../../js/WdatePicker.js"></script>
	<script type="text/javascript" src="../../js/jquery.pagination.js"></script>
  </head>
  
  <body>
  	<div class="title"><h2>菜单角色</h2></div>
	<div class="table-box">
		<table>
	    	<thead>
	        	<tr>
	            	<th class="num">角色编号</th>
	                <th class="name">角色名称</th>
	                <th class="process">角色操作</th>
	            </tr>
	        </thead>
	        <tbody id="menuRole">
	        	<!-- 菜单角色 -->
	        </tbody>
	    </table>
	</div>
  </body>
  
  <script type="text/javascript">
  	function editMenu(index){
  		$("#role"+index).text();
  	}
  	
  	$(function(){
  		//查询所有角色信息
  		$.ajax({
  		 type:"POST",
  		 url:"publicInfoManager.action",
  		 data:"method=queryRole",
  		 success:function(msg){
  		 	var str="";
  		 	for(var i=0;i<msg.length;i++){
  		 		str+="<tr><td id='role"+i+"' class='node'>"+msg[i].roleId+"</td>";
  		 		str+="<td class='time'>"+msg[i].roleName+"</td>";
  		 		str+="<td class='operate'><a href='publicInfoManager.action?";
  		 		str+="method=transmitId&roleId="+msg[i].roleId+"'>编辑</a></td></tr>";
  		 	}
  		 	$("#menuRole").html(str);
  		 	
  		 }
  		});
  	});
  </script>
  
</html>
